using System;
using System.Collections.Generic;

namespace Narwhunderful.Aphelia.Framework.UI
{

    public class UIVerticalNavigableComponentComparer<T> : IComparer<T> where T : UIComponent
    {

        public virtual int Compare(T component1, T component2)
        {
            if (component1.VerticalNavagationIndex > component2.VerticalNavagationIndex)
            {
                return 1;
            }
            if (component1.VerticalNavagationIndex < component2.VerticalNavagationIndex)
            {
                return -1;
            }
            return 0;
        }

    }

}
